package xyz.robinbingo.effectivejava.chapter02.item05.third;

import xyz.robinbingo.effectivejava.chapter02.item05.Lexicon;

import java.util.List;
import java.util.Objects;

// Dependency injection provides flexibility and testability
public class SpellChecker {
    private final Lexicon dictionary;

    public SpellChecker(Lexicon dictionary) {
        this.dictionary = Objects.requireNonNull(dictionary);
    }

    public boolean isValid(String word) {
        return "hello".equals(word);
    }

    public List<String> suggestions(String typo) {
        return null;
    }
}